import React from "react";
import View from "../base/View";
import defaultData from "./data";
import {WeaInput} from "ecCom";

export default class EmailView extends View {
  renderForPC(data, value) {
    return (
      <div className='wea-edc-input-conatiner wea-input-normal'>
        <i className='icon-edc-f-email wea-edc-input-icon' />
        <WeaInput value={value} onBlur={this.handleValueChange} regExp={/^[0-9a-zA-Z@.]+$/}/>
      </div>
    );
  }

  renderForMobile(data, value) {
    return (
      <div className='wea-edc-input-conatiner wea-input-normal'>
        <i className='icon-edc-f-email wea-edc-input-icon' />
        <input className='ant-input' 
          type='email'
          value={value} 
          onChange={this.handleValueChangeForNE} 
        />
      </div>
    );
  }
}

EmailView.defaultProps = {
  data: defaultData,
  value: ''
};